function disp_patch

Screen('Preference', 'SkipSyncTests', 1)
Screen('Preference', 'Verbosity', 0)
[w,rect]=Screen('OpenWindow',0,125,[ 0 0 1000 800 ])
Screen('BlendFunction',w, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

%w=10
bgColor = 125;

diameter = 60;
angle = rand*360;

n  = 8;

i_target  = ceil(rand*n);
freq = .08;
phase = 0;

p = CreateCircularGratingPatch(diameter,freq,angle.*(i==i_target),phase);
tex = Screen('MakeTexture',w,cat(3,p(:,:,1),p(:,:,2)));
Screen('DrawTexture', w, prod(tex/255,3)*255,[],[],[],[], [], bgColor);
t=Screen('flip',w);
